package com.magenta.maxoptra.gis.distancematrix.events;

import com.magenta.maxoptra.gis.distancematrix.Event;
import com.magenta.maxoptra.gis.distancematrix.EventType;

/**
 * @author Sergey Grachev
 */
public final class MatrixUpdateProgressEvent implements Event {

    private static final long serialVersionUID = -1958009313300568126L;

    private final long groupId;
    private final long matrixId;
    private final long total;
    private final long progress;

    MatrixUpdateProgressEvent(final long groupId, final long matrixId, final long total, final long progress) {
        this.groupId = groupId;
        this.matrixId = matrixId;
        this.total = total;
        this.progress = progress;
    }

    @Override
    public EventType getType() {
        return EventType.MATRIX_UPDATE_PROGRESS;
    }

    public long getGroupId() {
        return groupId;
    }

    public long getMatrixId() {
        return matrixId;
    }

    public long getTotal() {
        return total;
    }

    public long getProgress() {
        return progress;
    }

    @Override
    public String toString() {
        return "MatrixUpdateProgressEvent{" +
                "groupId=" + groupId +
                ", matrixId=" + matrixId +
                ", total=" + total +
                ", progress=" + progress +
                '}';
    }
}
